<?php
class M {
    private static $instance = null;
    
    function __construct() {
        
    }
    
    /** @return S */
    private static function getInstance() {
        if (self::$instance == null) {
            self::$instance = new M();
        }
        return self::$instance;
    }

    static function __callStatic($name, $arguments) {
        $self=M::getInstance();
        if(in_array($name,S::db()->getTables())) {
            return $self->record();
        }
    }
}